﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.Message>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	修改通知
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul>
	            <li><a href="/Message/Index"><span>通知管理</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>修改通知</span></a></li>
	        </ul>
	    </div>
	</div>

    <% using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.Id) %>
            
    <table class="tableCss" cellspacing="0" cellpadding="0" align="center" border="0" style="margin-top:10px">
        <tr>
            <th colspan="2" class="heightrow" align="left" style="padding:10px">
                通知详情
            </th>
        </tr>
        <tr>
            <td class="row1" align="center" width="100px">所属公司</td>
            <td class="row1" align="left">
                <%= Html.DropDownList("FactoryId", ViewData["factories"] as List<SelectListItem>, "请选择公司", new { style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.FactoryId) %>
            </td>
        </tr>
        <tr>
           <td class="row1" align="center">通知类型</td>
           <td class="row1" align="left">
                <select name="type">
                    <option>请选择类型</option>
                    <option value="1" <%if(Model.type == 1){ %> selected <%} %>>重要</option>
                    <option value="2" <%if(Model.type == 2){ %> selected <%} %>>一般</option>
                    <option value="3" <%if(Model.type == 3){ %> selected <%} %>>系统维护</option>
                </select>
                <%= Html.ValidationMessageFor(model => model.type)%>
           </td>
        </tr>
        <tr>
           <td class="row1" align="center">优先级</td>
           <td class="row1" align="left">
                <%= Html.DropDownList("priority", ViewData["priorities"] as List<SelectListItem>, "请选择优先级", new {style="width:150px"})%>
                <%= Html.ValidationMessageFor(model => model.priority)%>
           </td>
        </tr>
        <tr>
           <td class="row1" align="center">开始时间</td>
           <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.beginTime, new { @readonly = "readonly", style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.beginTime) %>
           </td>
        </tr>
        <tr>
           <td class="row1" align="center">结束时间</td>
           <td class="row1" align="left">
                <%= Html.TextBoxFor(model => model.endTime, new { @readonly = "readonly", style="width:150px"})%>
                <%= Html.ValidationMessageFor(model => model.endTime) %>
           </td>
        </tr>
        <tr>
           <td class="row1" align="center" valign="top">通知内容</td>
           <td class="row1" align="left">
                <%= Html.TextAreaFor(model => model.content, new { cols=50, rows=10})%>
                <%= Html.ValidationMessageFor(model => model.content) %>
           </td>
        </tr>
    </table>
    
    <div style="margin-top:25px;text-align:center">
        <input type="submit" value="提    交" style="font-size:16px;font-weight:bold" />
    </div>
    <% } %>

    <script type="text/javascript" language="javascript">
        $('#beginTime').datetimepicker({
            showSecond: true,
            timeFormat: 'hh:mm:ss'
        });

        $('#endTime').datetimepicker({
            showSecond: true,
            timeFormat: 'hh:mm:ss'
        });
    </script>
</asp:Content>
